package com.manager.seat.service.impl;

import com.manager.seat.dao.TbSysUserMapper;
import com.manager.seat.model.TbSysUser;
import com.manager.seat.service.TbSysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName TbSysUserServiceImpl
 * @Description TODO
 * @date 2022/12/18 22:24
 * @Version 1.0
 */
@Service
public class TbSysUserServiceImpl implements TbSysUserService {
    @Autowired
    private TbSysUserMapper tbSysUserMapper;

    @Override
    public List<TbSysUser> getAll() {
        return null;
    }

    @Override
    public TbSysUser getOne(Long id) {
        return tbSysUserMapper.selectByPrimaryKey(id);
    }


    @Override
    public TbSysUser getOne(String userId) {
        return tbSysUserMapper.selectByUserId(userId);
    }

    @Override
    public int update(TbSysUser record) {
        return tbSysUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int delete(Long id) {
        return tbSysUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int add(TbSysUser record) {
        return tbSysUserMapper.insert(record);
    }
}
